<template>
  <div>
    <h2>数据驱动试图</h2>
    <p>{{age}}</p>
    <button @click="age++">按钮</button>

    <p>{{str}}</p>
    <button @click="aa">反转世界</button>
  </div>
</template>

<script>
export default {
  data(){
    return{
      age:20,
      str:'你好世界'
    }
  },
  methods: {
    aa(){
      this.str = this.str.split('').reverse().join('')
    }
  }

}
</script>

<style>

</style>
